<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePrescriptionDiseasesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('prescription_diseases', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('prescription_info_id')->default(0)->comment('处方信息id');
            $table->integer('disease_id')->default(0)->comment('疾病id');
            $table->string('disease_name')->nullable()->default('')->comment('疾病名称');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('prescription_diseases');
    }
}
